﻿using System;
using System.Data;
using System.Collections;
using System.Collections.Generic;

namespace AbstractSql {
    public interface IAbsDBCommandExecution {
        IAbsDBCommandExecution WithParam(string paramName, object paramValue);
        void ExecuteNonQuery();
        T ExecuteScalar<T>();
        T ExecuteScalar<T>(T defaultValue);
        void ExecuteReaderSingle(Action<IDataReader> action);
        void ExecuteReader(Action<IDataReader> action);
        T ExecuteReaderSingle<T>(ModelMapper<T> mapper) where T : class, new();
        DataTable AsDataTable();
        List<T> AsList<T>();
        List<T> AsList<T>(ModelMapper<T> mapper);
        Hashtable AsHashTable();
    }
}